#include "StdAfx.h"
#include "MutexPtr.h"


CMutexPtr::CMutexPtr(OpenThreads::Mutex* pMutex)
{
	if(NULL != m_pMutex)
	{
		m_pMutex = pMutex;
	}
}

CMutexPtr::~CMutexPtr(void)
{
	 m_pMutex->unlock();
}

OpenThreads::Mutex* CMutexPtr::operator ->()
{
	return m_pMutex;
}

OpenThreads::Mutex* CMutexPtr::get()
{
	return m_pMutex;
}
